scriptExecutionErrors
Type
property
Summary
Reports a list of all possible LiveCode script execution errors.
Syntax
put the scriptExecutionErrors
Description
Use the scriptExecutionErrors property to get a list of all possible errors thrown during handler execution. When a script throws an error during execution it returns a four-item, comma separated error code, as follows:
- item 1 - the line number of the scriptExecutionErrors that describes the error.
- item 2 - the line number of the script where the execution error occurs.
- item 3 - the character position on the line of the token or command that threw the error.
- item 4 (optional) - the token or command that threw the error.
In the example above might return an error code in the catch clause, such that the variable tErr would contain something like this:
573,4,13,in
This would indicate that the error description is found on line 573 of the scriptExecutionErrors, and that the error occurred on line 4 of the script, on character 13, the token 'in'.
The scriptExecutionErrors property is read-only and cannot be set.
The scriptExecutionErrors property returns the list of errors only in the IDE and LiveCode Server. It returns empty in standalones.
Examples
-- Use of scriptExecutionErrors in a try statement
on mouseUp
local tErr
try
CommandThatDoesNotExist -- execution error in this line
catch tErr
put line (item 1 of tErr) of the scriptExecutionErrors
-- reports details about the error
end try
end mouseUp
Related
glossary: error message, execute, execution error, IDE, item, standalone application
message: scriptExecutionError
Compatibility and Support
Introduced
LiveCode 6.0
OS
mac
windows
linux
Platforms
desktop
server